import axios from "axios";
// import { log } from "console";

const instance = axios.create({
  baseURL: import.meta.env.VITE_BASE_URL,
  // timeout: 1000,
  // headers: {'X-Custom-Header': 'foobar'}
});

// 重试次数，共请求2次
instance.defaults.retry = 1;
// 请求的间隙

instance.defaults.retryDelay = 1500;

export default { instance, axios };
